/*
 * @Description:
 * @Author: wangqi
 * @Date: 2022-03-10 17:28:13
 * @LastEditTime: 2022-06-02 10:08:55
 */
import { createApp } from 'vue';
import App from './App.vue';

import { setupRouter } from '@/router';
import { setupStore } from '@/store';

import { setupAssets, setupAntd, setupCustomComponents } from '@/plugins';

const app = createApp(App);

function setupPlugins() {
  // 引用静态资源
  setupAssets();
  // 全局安装Antd
  setupAntd(app);
  // 全局安装自定义组件
  setupCustomComponents(app);
}

async function setupApp() {
  await setupStore(app);
  await setupRouter(app);

  app.mount('#app', true);
  console.log(app, 'app');
}

setupPlugins();
setupApp();
